package cn.tedu.baking.config;

import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinioConfig {
    private String endpoint="http://192.168.237.129:9000";
    //这里要用minio中自己创建的key
    private String accessKey="vYDtdM9eXNrkV2dlz13F";
    //这里要用minio中自己创建的secretKey
    private String secretKey="DRhYboh960xKurF02sPLG1eAlVWHILiwiKByCMjp";
    @Bean
    public MinioClient getMinioClient() {
        return MinioClient.builder()
                .endpoint(endpoint)
                .credentials(accessKey, secretKey).build();
    }
}
